<include file="common/hearder"/>
<h4><span class="dq  glyphicon glyphicon-user">请假申请表</span></h4>
<div style="width: 100%;height: 1px ;border: 1px solid #cdcdcd;" class="hr"></div>
<form action="">
    <div style="position: relative;left: 940px;top: -30px;">
        <input type="text" name="value" placeholder="{$value ? $value : '请输入申请人的姓名'}" class="am-form-field">
        <span class="am-input-group-btn">
            <input name="search" class="am-btn am-btn-default" type="submit" value="搜索">
        </span>
    </div>
</form>
<form action="{:U('del_all')}" id="list">
    <table class="table table-hover table-bordered">
        <thead>
        <th><input class="check_all" type="checkbox"></th>
        <th class="active">编号</th>
        <th class="active">申请类型</th>
        <th class="active">请假内容</th>
        <th class="active">开始时间</th>
        <th class="active">结束时间</th>
        <th class="active">请假人</th>
        <th class="active">操作</th>
        </thead>
        <tbody>
        <foreach name="leaveList" item="leave">
            <tr class="active">
                <td><input class="check_item" type="checkbox" value="{$leave.ln_id}" name="ln_ids[]"></td>
                <td>{$leave.ln_id}</td>
                <td><?php foreach($typeList as $type){
                if($type['atrid']==$leave['ln_type']){
                 echo $type[atrnmae];
                 }}?></td>
                <td>{$leave.ln_content}</td>
                <td>{$leave.ln_starttime}</td>
                <td>{$leave.ln_endtime}</td>
                <td><?php foreach($staffList as $staff){
                if($staff['stf_id']==$leave['stf_id']){
                 echo $staff[stf_name];
                 }}?></td>
                <td>
                    <a href="{:U('del')}?ln_id={$leave.ln_id}" class="btn btn-xs btn-danger">删除</a>
                </td>
            </tr>
        </foreach>
        </tbody>

    </table>
</form>
<div>共 {$count} 条记录</div>
<div class="show_page">{$show}</div>
<style>
    .dq {
        display: block;
        margin-top: 20px;
    }

    .hr {
        margin-bottom: -10px;
        width: 100%;
        height: 1px;
        border: 1px solid #cdcdcd;
    }

    .prev, .next {
        font-size: 12px;
        line-height: 22px;
    }

    .prev, .current, .num, .next {
        display: block;
        width: 44px;
        height: 37px;
        border: 1px solid #ddd;
        text-align: center;
        padding: 7px 12px;
        float: left;
        margin: 0 5px;
    }

    .prev:hover, .num:hover, .next:hover {
        background-color: #ddd;
    }

    .current {
        background-color: #36b1ef;
        color: white;
        border: 1px solid #36b1ef;
    }

    .show_page {
        float: right;
    }
</style>
<script>
    $('.check_all').on('click', function () {
        if ($(this).prop('checked')) {
            $('.check_item').each(function () {
                if ($(this).prop('checked')) {
                    $(this).prop('checked', false);
                } else {
                    $(this).prop('checked', true);
                }
            });
        } else {
            $('.check_item').prop('checked', false);
        }
    });
</script>
<include file="common/footer"/>